#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class Trainee : Business.BusinessBase<Trainee, int>
	{
		#region Fields and Properties

		private String politicalCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String PoliticalCode
		{
			get { return politicalCode; }
			set
			{
				if (value != politicalCode)
				{
					MarkChanged("PoliticalCode");
					politicalCode = value;
				}
			}
		}

		private String trainingCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String TrainingCode
		{
			get { return trainingCode; }
			set
			{
				if (value != trainingCode)
				{
					MarkChanged("TrainingCode");
					trainingCode = value;
				}
			}
		}

		private String address = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Address
		{
			get { return address; }
			set
			{
				if (value != address)
				{
					MarkChanged("Address");
					address = value;
				}
			}
		}

		private String phone = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Phone
		{
			get { return phone; }
			set
			{
				if (value != phone)
				{
					MarkChanged("Phone");
					phone = value;
				}
			}
		}

		private String identifyCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String IdentifyCode
		{
			get { return identifyCode; }
			set
			{
				if (value != identifyCode)
				{
					MarkChanged("IdentifyCode");
					identifyCode = value;
				}
			}
		}

		private String identifyCate = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String IdentifyCate
		{
			get { return identifyCate; }
			set
			{
				if (value != identifyCate)
				{
					MarkChanged("IdentifyCate");
					identifyCate = value;
				}
			}
		}

		private String photo = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Photo
		{
			get { return photo; }
			set
			{
				if (value != photo)
				{
					MarkChanged("Photo");
					photo = value;
				}
			}
		}

		private DateTime birthday = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime Birthday
		{
			get { return birthday; }
			set
			{
				if (value != birthday)
				{
					MarkChanged("Birthday");
					birthday = value;
				}
			}
		}

		private Byte gender = 0;
		/// <summary>
		/// 
		/// </summary>
		public Byte Gender
		{
			get { return gender; }
			set
			{
				if (value != gender)
				{
					MarkChanged("Gender");
					gender = value;
				}
			}
		}

		private String name = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Name
		{
			get { return name; }
			set
			{
				if (value != name)
				{
					MarkChanged("Name");
					name = value;
				}
			}
		}

		private String code = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Code
		{
			get { return code; }
			set
			{
				if (value != code)
				{
					MarkChanged("Code");
					code = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public Trainee()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override Trainee DataSelect(int id)
		{
			return Services.DALService.TraineeService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.TraineeService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.TraineeService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.TraineeService.Delete(this);
		}

		#endregion Base overrides
	}
}
